/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package FrameSekretariat;

import Database.UserDokumenTable;
import Database.UserSuratTable;
import Model.Dokumen;
import Model.Surat;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JTable;
import javax.swing.JTextField;

/**
 *
 * @author User
 */
public class SekreLihatDokumen extends JFrame {
    private JTable tableDokumen;
    private ArrayList<Dokumen> data;
    private JButton buttonOk;

    public SekreLihatDokumen(ArrayList<Dokumen> data) {
        this.setTitle("Daftar Dokumen");
        this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        this.setBounds(220, 150, 800, 500);
        this.setLayout(null);
        this.data = data;
        
        tableDokumen = new JTable();
        tableDokumen.setBounds(25, 25, 730, 370);
        tableDokumen.setModel(new UserDokumenTable(data));
        this.add(tableDokumen);

        buttonOk = new JButton("OK");
        buttonOk.setBounds(335, 415, 80, 30);
        this.add(buttonOk);
        buttonOk.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                setVisible(false);
            }
        });
    }
    
    public ArrayList<Dokumen> getData() {
        return data;
    }

    public void setData(ArrayList<Dokumen> data) {
        this.data = data;
    }
}


